//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package study.IO.字符流.Reader;

import java.io.FileReader;
import java.io.IOException;
import java.nio.charset.Charset;

public class FileReader_demo {
    public FileReader_demo() {
    }

    public static void main(String[] args) throws IOException {
        FileReader fr = new FileReader("JavaTest\\Files\\gbk.txt");
        new FileReader("JavaTest\\Files\\gbk.txt", Charset.forName("GBK"));
        char[] buffer = new char[3];

        int ch;
        while((ch = fr.read(buffer)) != -1) {
            System.out.println(new String(buffer, 0, ch));
        }

        fr.close();
    }
}
